'''7.4一二维数据的格式化和处理'''
'''7.4.3一二维数据的表示和读写'''
#【微实例7.8】导入CSV格式数据到列表
with open("price2016.csv",'r') as fo:
    ls=[]
    for line in fo:
        line=line.replace("\n","")
        ls.append(line.split(","))  #ls成为数组
    print(ls)

#【微实例7.9】逐行处理CSV格式数据
with open("price2016.csv","r" ) as fo:
    ls=[]
    for line in fo:
        line=line.replace("\n","")
        ls=line.split(",")
        lns=""
        for s in ls:
            lns+="{}\t".format(s)
        print(lns)

